#pragma once
#include "Entity.h"
#include "Struct.h"

class LineEntity : public Entity {
public:
	LineEntity(LineTag tag) : m_tag(tag) { create(tag); }

	void create(LineTag tag);

	LineTag tag() const { return m_tag; }
	void setTag(LineTag tag) { m_tag = tag; }

private:
	LineEntity(Entity* parent): Entity(parent) {}

	enum { ASCHILD = 1, SOLID = 1, DASHED = 0 };
	void fillOneLineData(const LineEq& lineEq, bool isSolid, const CColor& color, bool asChild = false, float slopeRatioByWidth = 0);

	void fillRoadEdge(const LineEq& lineEq);

	LineTag m_tag;
};